//
//  UILabel+LineSpacing.m
//  Shopping
//
//  Created by uplooking on 2017/9/19.
//  Copyright © 2017年 Lily_YH. All rights reserved.
//

#import "UILabel+LineSpacing.h"

@implementation UILabel (LineSpacing)

- (void)initWithString:(NSString *)string spacing:(CGFloat)spacing{
    
    NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
    paraStyle.lineSpacing = spacing * kAutoScanleX;
    NSDictionary *dic = @{NSParagraphStyleAttributeName:paraStyle, NSKernAttributeName:@1.5f };
    NSAttributedString *attributeStr = [[NSAttributedString alloc] initWithString:string attributes:dic];
    self.attributedText =attributeStr;
    
}
@end
